<template>
  <p>{{ count }}</p>
  <!-- 
    所有事件默认都是原生DOM事件
   -->
  <!-- <Child @click="count++" /> -->
  <Child @add="count++"/>
</template>

<script>
import Child from "./Child.vue";

export default {
  name: "App",
  components: {
    Child,
  },
  data() {
    return {
      count: 0,
    };
  },
};
// This starter template is using Vue 3 experimental <script setup> SFCs
// Check out https://github.com/vuejs/rfcs/blob/master/active-rfcs/0040-script-setup.md
</script>

<style></style>
